Repository navigation
Runs stop only when they must: tooling failures, environments, ticket diagnoses, existing open PRs - #349
Merged
Conversation
nambok
force-pushed
the
feat/stop-discipline
branch
from
October 28, 2026 01:24
93c56e8 to
a13a759
Compare
… the ticket's own plan followed, open PRs not duplicated A run on a failing-test ticket stopped with "needs more detail" when its own type-check failed for want of dependencies, when production and staging content differed, when the ticket already gave the cause and the plan, and while another open PR already fixed the same test. Each of those is now a rule enforced in code (common::stop_rules, worker passes::stop_gate): 1. Tooling: a step that fails for want of a dependency or command (missing package modules, command not found, an install that failed, the sandbox) is classified as tooling. Package checks install and run through the package's own manager; a tooling failure gets one repair (install, then the command again) and otherwise ends the run as a tooling failure with the exact command and error (stop_kind and tooling_failure on the run). A question quoting a tooling error is never asked. 2. Environment: a test-related run reads the suite's runner config, env files (keys and credential-free addresses only), setup, data and fixtures, records them with its evidence, and every agent is told to judge data there. A stop citing a difference between environments is refused. 3. Ticket diagnosis: the ticket's root cause, fix plan and acceptance criteria are quoted (checked against the ticket's own text) and given to every agent. With all three, a question is asked only when it cites a path:line that exists or a lookup the run made; others are dropped and the plan is sent back to follow the ticket. 4. Existing work: before work starts and again before the PR opens, open PRs by anyone are matched on the ticket key, failing test names, spec files and changed files; one a model reads as doing the work ends the run as covered_by_pr, linked on the run and on the ticket, unless the ticket asks for a separate change or a person already chose.
nambok
force-pushed
the
feat/stop-discipline
branch
from
October 28, 2026 18:16
a13a759 to
d4eb868
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A run on a failing end-to-end test ticket stopped with "needs more detail". Four things were wrong with that stop:
Each of these is now a rule, enforced in code for every team. The pure logic is in
common::stop_rules, and the worker applies it inpasses::stop_gateat each point where a run would stop.Changes
Rule 1: tooling failures are never questions (
stop_rules::tooling)Cannot find module 'x', not a relative import or path alias), command not found or exit 127, an npx with no executable, npm, pnpm or yarn install errors, and sandbox errors.pnpm exec,yarnorbunx.Tooling failure: \cmd` failed: error. The run record getsstop_kind = toolingandtooling_failure {command, error, tried}, which the API returns. It is neverneeds_input`.Rule 2: tests are judged where they run (
stop_rules::environment,test_fix::read_environment)Evidence.environment) and given to every agent, with the rule that a difference between environments is not a contradiction.environment_differenceis refused.Rule 3: the ticket's own diagnosis is followed (
stop_rules::screen,stop_gate::diagnosis)path:linethat exists at the base branch, or a lookup the planner made.Question.evidenceis stored, shown in the ticket comment, and returned by the API.Rule 4: existing open work (
stop_rules::existing_work,stop_gate::existing_work)covered_by_prand keeps acovered_byrecord. The summary says "Already being fixed in #N", and the same note goes on the ticket (Jira or GitHub).covered_by_pris added to the status list, to retry, to the trigger gate (only a ticket edit starts another run), to the webhook status enum and to the comment reader.Verification
services/common/src/stop_rules/testdata/:cargo fmt --checkpasses, andcargo clippy --workspace --all-targets -D warningsis clean.cargo test --workspace: common 1257, gateway 593 and worker 782 passed, 0 failed.docs/api/openapi.jsonwas regenerated withUPDATE_OPENAPI=1.